package com.leo.springboot.dao;

import com.leo.springboot.pojo.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserDao {
    @Select("SELECT * FROM User WHERE username = #{username}")
    User findByUsername(String username);

    @Insert("INSERT INTO User (username, password) VALUES (#{username}, #{password})")
    Integer save(User user);
}
